import request from '@/utils/request'

// 创建用户提现
export function createUserExtractCashInfo(data) {
  return request({
    url: '/system/user-extract-cash-info/create',
    method: 'post',
    data: data
  })
}

// 更新用户提现
export function updateUserExtractCashInfo(data) {
  return request({
    url: '/system/user-extract-cash-info/update',
    method: 'put',
    data: data
  })
}

// 删除用户提现
export function deleteUserExtractCashInfo(id) {
  return request({
    url: '/system/user-extract-cash-info/delete?id=' + id,
    method: 'delete'
  })
}

// 获得用户提现
export function getUserExtractCashInfo(id) {
  return request({
    url: '/system/user-extract-cash-info/get?id=' + id,
    method: 'get'
  })
}

// 获得用户提现分页
export function getUserExtractCashInfoPage(params) {
  return request({
    url: '/system/user-extract-cash-info/page',
    method: 'get',
    params
  })
}

// 导出用户提现 Excel
export function exportUserExtractCashInfoExcel(params) {
  return request({
    url: '/system/user-extract-cash-info/export-excel',
    method: 'get',
    params,
    // responseType: 'blob'
  })
}


// 审核用户提现
export function approve(data) {
  return request({
    url: '/system/user-extract-cash-info/approve',
    method: 'put',
    data: data
  })
}

/**
 * 获取用户提现详情
 */
export function getByOrderNo(id) {
  return request({
    url: '/system/order-info/getByOrderNo?orderNo=' + id,
    method: 'get'
  });
}
